package com.zpl.order.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zpl.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

@Data
@ApiModel(value = "订单细节", description = "订单细节实体")
@TableName("order_details")
public class OrderDetails extends BaseEntity {
    @ApiModelProperty(value = "订单表id", required = true)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @TableField(value="order_id")
    private Long orderId;
    @ApiModelProperty(value = "商品id", required = true)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @TableField(value="product_id")
    private Long productId;
    @ApiModelProperty(value = "商品名称", required = true)
    @TableField(value="product_name")
    private String productName;
    @ApiModelProperty(value = "购买商品数量", required = true)
    @TableField(value="product_cnt")
    private int productCnt;
    @ApiModelProperty(value = "购买商品单价", required = true)
    @TableField(value="product_price")
    private BigDecimal productPrice;
    @ApiModelProperty(value = "平均成本价格", required = true)
    @TableField(value="average_cost")
    private BigDecimal averageCost;
    @ApiModelProperty(value = "优惠分摊金额", required = true)
    @TableField(value="fee_money")
    private BigDecimal feeMoney;
    @ApiModelProperty(value = "仓库id", required = true)
    @TableField(value="w_id")
    private int wId;
}
